<%--
  Created by IntelliJ IDEA.
  User: huimao
  Date: 2020/6/18
  Time: 8:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css"/>
    <style type="text/css">
        .layui-table img {
            width: auto;
            height: auto;
            max-width: 100% !important;
            max-height: 100%;
        }
    </style>
</head>
<body>

<%--表格--%>
<table id="bannerTable" lay-filter="bannerTable" lay-size="lg"></table>
<%--表格结束--%>


<script type="text/javascript" src="${pageContext.request.contextPath}/layui/layui.js"></script>
<%--引入jquery的代码引入--%>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.12.4.js"></script>
<script>
    layui.use(['form', 'layer', 'table', 'upload', 'laydate'], function () {
        var table = layui.table;
        var layer = layui.layer;
        var form = layui.form;
        var upload = layui.upload;
        var laydate = layui.laydate;
        var layerIndex;

        /*初始化表格信息*/
        table.render({
            elem: '#bannerTable'
            , url: '${pageContext.request.contextPath}/role/selectAllPage' //数据接口
            , page: true //开启分页
            , limit: 5
            , limits: [5, 10]
            , cols: [[ //表头
                {field: 'roleId', title: 'ID', sort: true, fixed: 'left'}
                , {field: 'roleName', title: '名字'}
                , {field: 'roleDescription', title: '描述'}
            ]]
        });
        /*初始化表格信息结束*/


    });
</script>

</body>
</html>
